package vn.demand.dragon.controller
{
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	import vn.demand.dragon.model.MasterdataProxy;
	import vn.demand.dragon.model.vo.Company;
	
	public class CompanyDeletedCommand extends SimpleCommand
	{
		override public function execute( note:INotification ) :void    
		{
			var masterdataProxy : MasterdataProxy = facade.retrieveProxy(MasterdataProxy.NAME) as MasterdataProxy;
			var company:Company = note.getBody() as Company;
			RIALogger.debug(this, "CompanyDeletedCommand");
			masterdataProxy.removeObject(new XML("<type><label>" + company.company_name + "</label><data>" + company.company_id + "</data></type>"), 'company');
		}

	}
}